DEFINITION MODULE CalcValidate;


FROM SYSTEM IMPORT LONGWORD, STRPTR;


(* Validate operations taking into account the current bit size and the
 * current setting for signed/unsigned. If they fail the test, then return
 * FALSE and prepare a message string to display to the user.
 *)


VAR
  (* When an error occurs, this will point to an error string that can be
   * displayed to the user.
   *)
  errorString : STRPTR;


PROCEDURE Addition(val1,val2:LONGWORD): BOOLEAN;

PROCEDURE Subtraction(val1,val2:LONGWORD): BOOLEAN;
(* val1-val2 *)

PROCEDURE Multiplication(val1,val2:LONGWORD): BOOLEAN;

PROCEDURE Division(val1,val2:LONGWORD): BOOLEAN;
(* val1 DIV val2 *)


END CalcValidate.
